import { Button } from 'antd';
import React from 'react';
import { history } from 'umi';
import { getCookie } from '@/utils';
interface Props {}

const HeadTitle = (props: Props) => {
  return (
    <div>
      <span>当前操作用户:</span>
      <span> {getCookie('username') || '用户'} </span>
      <Button
        onClick={() => {
          history.push('/login');
        }}
      >
        退出
      </Button>
    </div>
  );
};

export default HeadTitle;
